package _05封装;

public class AreaMessage {
	// 属性: 地址 价格(w/平方米) 面积 总楼层数 所在楼层数 总价
	// 总楼层数 和所在楼层数 要在setter中判断合理性
	// 重写toString() 返回 房产信息
	private String adress;
	private double price;
	private double houseArea;
	private int floorAll;
	private int atFloor;
	private int lastPrice;
	public String getAdress() {
		return adress;
	}
	public void setAdress(String adress) {
		this.adress = adress;
	}
	public double getPrice() {
		return price;
	}
	public void setPrice(double price) {
		this.price = price;
	}
	public double getHouseArea() {
		return houseArea;
	}
	public void setHouseArea(double houseArea) {
		this.houseArea = houseArea;
	}
	public int getFloorAll() {
		return floorAll;
	}
	public void setFloorAll(int floorAll) {
		if(floorAll<=100&&floorAll>1) {
			this.floorAll = floorAll;
		}
	}
	public int getAtFloor() {
		return atFloor;
	}
	public void setAtFloor(int atFloor) {
		if(atFloor<=100&&atFloor>1) {
			this.atFloor = atFloor;
		}
	}
	public int getLastPrice() {
		return lastPrice;
	}
	public void setLastPrice(int lastPrice) {
		this.lastPrice = lastPrice;
	}
	
	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return "地址"+this.getAdress()+"价格(w/平方米)"+this.price+"面积"+this.houseArea+"总楼层数"+this.getFloorAll()+"所在楼层数"+this.atFloor+"总价"+this.getLastPrice();
	}
}
